import HomeView from "@/views/Home/index.vue"
import CategoryView from "@/views/Category/index.vue"
import CarView from "@/views/Car/index.vue"
import MineView from "@/views/Mine/index.vue"
import LoginView from "@/views/Login/index.vue"
import RegisterView from "@/views/Register/index.vue"
import ListView from "@/views/List/index.vue"
import DetailView from "@/views/Detail/index.vue"

import MainFooterView from "@/views/Layout/MainFooter.vue"


let routes = [
    {
        path:"/",
        alias:"/home",
        name:"home",
        components:{
            default:HomeView,
            footer:MainFooterView
        },
    },
    {
        path:"/category",
        name:"category",
        components:{
            default:CategoryView,
            footer:MainFooterView
        },
    },
    {
        path:"/car",
        name:"car",
        components:{
            default:CarView,
            footer:MainFooterView
        },
    },
    {
        path:"/mine",
        name:"mine",
        components:{
            default:MineView,
            footer:MainFooterView
        },
    },
    {
        path:"/list",
        name:"list",
        component:ListView,  // 默认渲染到default视图
    },
    {
        path:"/detail",
        name:"detail",
        component:DetailView,  // 默认渲染到default视图
    },
    {
        path:"/login",
        name:"login",
        component:LoginView,  // 默认渲染到default视图
    },
    {
        path:"/register",
        name:"register",
        component:RegisterView,
    }
];

export default routes;
